Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ


Displaying Rendered β€’ View raw β€’ Download

docs/lt-rLT/user/mqtt.md renovate/net.java.dev.jna-jna-5.x (5a8f4966) Text, 7.16 KB

title: MQTT
parent: User Guide
nav_order: 11
last_updated: 2026-05-13
description: Bridge your mesh to the internet β€” MQTT broker setup, encryption layers, and map reporting.
aliases:
β€’ mqtt
β€’ internet-bridge
β€’ broker

MQTT

MQTT bridges your Meshtastic mesh network to the internet, enabling long-range communication beyond radio range.

Overview

The MQTT module connects your node to an MQTT broker, allowing:

β€’ Messages to reach nodes on different physical meshes via the internet
β€’ Integration with home automation and monitoring systems
β€’ Publishing node positions to the public Meshtastic map
β€’ Custom data pipelines for logging and alerting

How It Works

T282828
[Your Node] β†’ Radio β†’ [Gateway Node with WiFi] β†’ MQTT Broker β†’ [Remote Gateway] β†’ Radio β†’ [Remote Node]

A gateway node with internet access (WiFi or Ethernet) publishes mesh messages to an MQTT topic. Remote gateways subscribed to the same topic inject those messages into their local mesh.

Configuration

Enabling MQTT

1. Navigate to Settings β†’ Module Config β†’ MQTT.
2. Enable the MQTT module.
3. Configure the broker connection:


β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Setting β”‚ ApraΕ‘ymas β”‚ Default β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Server Address β”‚ MQTT broker hostname β”‚ mqtt.meshtastic.org β”‚
β”‚ Username β”‚ Broker authentication β”‚ meshdev β”‚
β”‚ Password β”‚ Broker authentication β”‚ large4cats β”‚
β”‚ Root Topic β”‚ Base topic for messages β”‚ msh β”‚
β”‚ Encryption β”‚ Encrypt MQTT payload β”‚ Enabled β”‚
β”‚ ~~JSON Output~~ β”‚ ⚠️ Deprecated β€” JSON packet support has been removed fr… β”‚ Disabled β”‚
β”‚ TLS β”‚ Secure connection to broker β”‚ Disabled β”‚
β”‚ Map Reporting β”‚ Report position to public map β”‚ Disabled β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Default Meshtastic Broker

The community maintains a public broker at T383838mqtt.meshtastic.org. This is intended for general use and testing.

β”‚ πŸ”’ Privacy: Messages on the public broker are readable by anyone subscribed. Always use channel
β”‚ encryption for private communications.

Private Broker

For better privacy and control, you can run your own MQTT broker:

β€’ Mosquitto (lightweight, open-source)
β€’ HiveMQ
β€’ EMQX

Configure your node to point to your private broker with appropriate credentials.

Map Reporting

When Map Reporting is enabled, your node publishes its position to the Meshtastic community map:

β€’ Visible at meshmap.net and similar community map services
β€’ Only position and node info are shared
β€’ Disable this if you don't want your location publicly visible

Uplink vs Downlink

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Direction β”‚ ApraΕ‘ymas β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Uplink β”‚ Messages from mesh β†’ MQTT broker β”‚
β”‚ Downlink β”‚ Messages from MQTT broker β†’ mesh β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Configure per-channel which directions are active to control message flow and airtime usage.

Message Formats

MQTT uses protobuf message format:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Format β”‚ ApraΕ‘ymas β”‚ Use case β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Protobuf β”‚ Binary Meshtastic protobuf encoding β”‚ Node-to-node mesh bridging β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”‚ ⚠️ Note: JSON output support was removed from firmware. The T383838json_enabled setting is still visible
β”‚ in the app for legacy compatibility but has no effect on current firmware versions.

Encryption & Privacy

Understanding the layered encryption model:

1. Channel encryption happens on the mesh before MQTT. If your channel has a PSK, the MQTT payload is already encrypted β€” the broker and any subscribers see only the ciphertext.
2. MQTT encryption (the module setting) adds an additional encryption layer for transit to the broker. This protects metadata and routing information.
3. TLS encrypts the TCP connection to the broker itself, preventing network-level eavesdropping.

β”‚ πŸ”’ Important: The default public channel has a well-known key. Messages on the default channel
β”‚ sent via MQTT are effectively unencrypted β€” anyone can decode them. Always use a custom PSK for
β”‚ private communications.

Best Practices

β€’ Use channel-level encryption (PSK) on channels that bridge to MQTT
β€’ Don't enable MQTT on nodes without internet access (it will buffer and waste memory)
β€’ Use a private broker for sensitive deployments
β€’ Be mindful of airtime when downlinking messages from busy MQTT topics β€” every downlinked message consumes radio airtime on your local mesh
β€’ Consider enabling uplink-only if you only need to monitor your mesh remotely without injecting messages back

Troubleshooting

MQTT Not Connecting

β€’ Check WiFi β€” the gateway node must have an active internet connection (WiFi or Ethernet). MQTT does not work over the LoRa radio link itself.
β€’ Verify credentials β€” incorrect username or password will silently fail on most brokers. Double-check for trailing spaces.
β€’ Firewall β€” port 1883 (MQTT) or 8883 (MQTT+TLS) must be open. Some networks block non-standard ports.
β€’ DNS resolution β€” if using a custom broker hostname, verify the node can resolve it. Try the broker's IP address directly.

Messages Not Bridging

β€’ Check uplink/downlink settings β€” if only uplink is enabled, messages flow from mesh to MQTT but not back. Enable downlink on the receiving gateway.
β€’ Channel mismatch β€” both gateways must share the same channel with the same PSK. A mismatch means messages are encrypted with different keys and appear as garbage.
β€’ Topic mismatch β€” ensure both gateways use the same root topic. The default T383838msh works for the public broker.

Related Topics

β€’ Settings β€” Modules & Admin β€” MQTT module configuration reference
β€’ Messages & Channels β€” channel encryption and PSK setup
β€’ MQTT integration guide β€” detailed MQTT documentation on meshtastic.org


Served by rngit 1.5.0 - Generated in 0.12s